#if !defined(_SSTRING_H)
#define _SSTRING_H

#include "SSimpleValue.h"
#include <boost/regex.hpp>

CREATE_ALIAS ( SString );

/**
 *   Class used to store a string value.
 */
class DECLARATION_DLL SString : public SSimpleValue
{
	/** The string value. */
	string value;

	/**
	 *  Create a SString variable with a specific value.
	 */
	SString(string value)
	{
		Set(value);
	}

	public:

		/**
		 * Get the variable type.
		 */
		virtual SType GetType() const
		{
			return STypeString;
		}

		/**
		 *   Set the string value.
		 */
		virtual void Set(string value) 
		{ 
			this->value = value;
		}
		
		/**
		 *   Get the string value.
		 */
		virtual string Get() 
		{ 
			return value; 
		}

		/**
		 * Returns a string representation of the value.
		 */
		virtual string ToString() 
		{ 
			return SSimpleValue::ToString(); 
		}

		/**
		 * Returns a string representation of the value in a specific format.
		 */
		virtual string ToString(string format);

		/**
		 *   Factory method to create a SString variable.
		 */
		static SStringSp Create(string value);

		/**
		 *   Factory method to create a SString variable from a string.
		 */
		static SStringSp Parse(string s);
};

#endif  //_SSTRING_H
